package main

import "fmt"

/**
  select多路复用
*/
func main() {
	var ch = make(chan int, 1)
	for i := 1; i <= 10; i++ {
		select {
		case data := <-ch:
			fmt.Println(data)
		case ch <- i:
			fmt.Println("send data..")
		}
	}
}
